//
//  HYSeg.h
//  HaiYue
//
//  Created by skyline on 2017/12/18.
//  Copyright © 2017年 skyline. All rights reserved.
//

#import <UIKit/UIKit.h>
typedef NS_ENUM(NSInteger,HYSegStyle)
{
    HYSegStyleLine = 1,
    HYSegStyleCircle
};

@protocol HYSegDelegate <NSObject>
@required
- (void)scrollSegWithCurrentIndex:(int)current;
@end

@interface HYSeg : UIControl;
@property (nonatomic, assign) HYSegStyle style;
@property (nonatomic, assign) int currentIndex;
@property (nonatomic, assign) int previousIndex;
@property (nonatomic, strong) NSArray *items;
@property (nonatomic, strong) UIColor *titleColor;
@property (nonatomic, strong) UIColor *selectedtTitleColor;
@property (nonatomic, strong) UIColor *selectedItemColor;
@property (nonatomic, assign) id<HYSegDelegate>delegate;
- (instancetype)initWithItems:(NSArray *)items;
@end
